# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: 7heo <7heo@mail.com>
# Maintainer:
pkgname=redshift
pkgver=1.12
pkgrel=1
pkgdesc="Adjusts the color temperature of your screen according to your surroundings"
url="http://jonls.dk/redshift/"
arch="all"
license="GPL-3.0"
makedepends="libxcb-dev libxxf86vm-dev libdrm-dev intltool"
subpackages="$pkgname-doc"
source="https://github.com/jonls/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-drm \
		--enable-randr \
		--enable-vidmode \
		--disable-silent-rules \
		--disable-nls \
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm644 redshift.conf.sample \
		"$pkgdir"/usr/share/doc/$pkgname/examples/redshift.conf
	install -m644 ABOUT-NLS DESIGN NEWS README README-colorramp \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="225e222e5f2c55be4571094ccaf02a92e162dfc35fd0fe504084e21e358b888a72f9992f9f9edaf1d496eb673af74a0d825ae5cf6ef7f0f1ab51d32419722c32  redshift-1.12.tar.xz"
